﻿// My methods here.
//-----------------------------------------------------------------------
// <Copyright file=News company=DHPD>
// Copyright (c) DHPD Corporation (http://dhpd.edu.vn). All rights reserved.
// </copyright>
// <author>HP</author>
//-----------------------------------------------------------------------


using System;
using System.Collections.Generic;
using KM.DAT;
using KM.ENT;
using KM.Models;

namespace KM.BUS
{
    /// <summary>
    /// This is busNews class
    /// </summary>

    public class busNews
    {
        public busNews()
        {
            //
            // TODO: Add constructor logic here
            //
        }
        public List<entNews> getAll(int Id, int Top)
        {
            return new datNews().getAll(Id, Top);
        }
        public List<entNews> getAll(int Id)
        {
            return new datNews().getAll(Id);
        }
        public void createEdit(entNews entN)
        {
            datNews datN = new datNews();
            datN.createEdit(entN);
        }
        public List<entNews> getAll(int Id,ref PagingInfoModel page)
        {
            datNews datN = new datNews();
            List<entNews> lst = new List<entNews>();
            lst = datN.getAll(Id, ref page);
            return lst;
        }
        public entNews getInfo(int Id)
        {
            datNews datN = new datNews();
            entNews entNNew = new entNews();
            entNNew = datN.getInfo(Id);
            return entNNew;
        }
        public bool delete(int Id)
        {
            datNews datN = new datNews();
            datN.delete(Id);
            return true;
        }
    }
}
